package com.itheima.homework;

import java.util.Random;

public class Test8 {
    public static void main(String[] args) {
        Random r = new Random();
        int[] arr = {2, 588, 888, 1000, 10000};

        for (int i = 0; i < arr.length; i++) {
            int a = r.nextInt(5);
            if (arr[a] != 0) {
                System.out.println(arr[a] + "元的奖金被抽出");
                arr[a] = 0;
            } else {
                i--;
            }
        }

    }
}





